home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1562 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: sierra.net!usenet
  2. From: T Colwell <snowbull@sierra.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Using multiple functions in one file
  5. Date: Thu, 11 Jan 1996 09:00:22 -0800
  6. Organization: Sierra-Net
  7. Message-ID: <30F54226.31EA@sierra.net>
  8. References: <DL00rI.HFr@cunews.carleton.ca>
  9. NNTP-Posting-Host: 204.94.232.59
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (WinNT; I)
  14.  
  15. Andrew Belo wrote:
  16. > I have written an example program out of a book and it keeps giving me an
  17. > error that says "Call to undefined function 'butler' in function main()"
  18. > I am using Borland C++ for Dos, Win and Win 32 Version 4.5.
  19. > The book is called C: Step by Step, and the program is as follows.
  20. > /* two_func.c -- a program using two functions in one file */
  21. > #include <stdio.h>
  22. > main()
  23. > {
  24. >         printf("I will summon the butler function. \n");
  25. >         butler();
  26. >         printf("Yes. Bring me some tea and floppy disks.\n");
  27. > }
  28. > butler()
  29. > {
  30. > printf("You rang, sir? \n");
  31. > }
  32. > Thanx
  33. > ----------------------------------------------------------------
  34. ------------
  35. > Andrew Belo           |  WARNING: Yes this message has spelling mistakes but
  36. > 1st Year Computer Sci |  learn to live with it!!!!!!!!
  37. > Carleton University   ------------------------------------------------------
  38. > Email address: abelo@chat.carleton.ca
  39. >                ai806@FreeNet.Carleton.CA
  40. > Home Page:     chat.carleton.ca/~abelo
  41. > ----------------------------------------------------------------
  42. ------
  43. Try placing butler() before main() and recompiling.
  44.